<%@page import="java.util.List"%>
<%@page import="com.bsd5ex.group1.kaokang.model.FoodSeason"%>
<%@page import="com.bsd5ex.group1.kaokang.model.FoodType"%>
<%@page import="com.bsd5ex.group1.kaokang.model.KitchenWare"%>
<%@page import="com.bsd5ex.group1.kaokang.model.UnitType"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Curry Shop ::ร้านข้าวแกง BSD 5EX</title>
<link rel="stylesheet" href="../../style/style.css" type="text/css" media="screen" title="default" />
<!--[if IE]>
<link rel="stylesheet" media="all" type="text/css" href="../../css/pro_dropline_ie.css" />
<![endif]-->

<!--  jquery core -->
<script src="../js/jquery/jquery-1.4.1.min.js" type="text/javascript"></script>
 
<!--  checkbox styling script -->
<script src="../js/jquery/ui.core.js" type="text/javascript"></script>
<script src="../js/jquery/ui.checkbox.js" type="text/javascript"></script>
<script src="../js/jquery/jquery.bind.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	$('input').checkBox();
	$('#toggle-all').click(function(){
 	$('#toggle-all').toggleClass('toggle-checked');
	$('#mainform input[type=checkbox]').checkBox('toggle');
	return false;
	});
});
</script>  


<![if !IE 7]>

<!--  styled select box script version 1 -->
<script src="../js/jquery/jquery.selectbox-0.5.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	$('.styledselect').selectbox({ inputClass: "selectbox_styled" });
});
</script>
 

<![endif]>


<!--  styled select box script version 2 --> 
<script src="../js/jquery/jquery.selectbox-0.5_style_2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	$('.styledselect_form_1').selectbox({ inputClass: "styledselect_form_1" });
	$('.styledselect_form_2').selectbox({ inputClass: "styledselect_form_2" });
});
</script>

<!--  styled select box script version 3 --> 
<script src="../js/jquery/jquery.selectbox-0.5_style_2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	$('.styledselect_pages').selectbox({ inputClass: "styledselect_pages" });
});
</script>

<!--  styled file upload script --> 
<script src="../js/jquery/jquery.filestyle.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
	$("input.file_1").filestyle({ 
	image: "images/forms/upload_file.gif",
	imageheight : 29,
	imagewidth : 78,
	width : 300
	});
});
</script>

<!-- Custom jquery scripts -->
<script src="../js/jquery/custom_jquery.js" type="text/javascript"></script>
 
<!-- Tooltips -->
<script src="../js/jquery/jquery.tooltip.js" type="text/javascript"></script>
<script src="../js/jquery/jquery.dimensions.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
	$('a.info-tooltip ').tooltip({
		track: true,
		delay: 0,
		fixPNG: true, 
		showURL: false,
		showBody: " - ",
		top: -35,
		left: 5
	});
});
</script> 

<!--  date picker script -->
<link rel="stylesheet" href="../../css/datePicker.css" type="text/css" />
<script src="../js/jquery/date.js" type="text/javascript"></script>
<script src="../js/jquery/jquery.datePicker.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
        $(function()
{

// initialise the "Select date" link
$('#date-pick')
	.datePicker(
		// associate the link with a date picker
		{
			createButton:false,
			startDate:'01/01/2005',
			endDate:'31/12/2020'
		}
	).bind(
		// when the link is clicked display the date picker
		'click',
		function()
		{
			updateSelects($(this).dpGetSelected()[0]);
			$(this).dpDisplay();
			return false;
		}
	).bind(
		// when a date is selected update the SELECTs
		'dateSelected',
		function(e, selectedDate, $td, state)
		{
			updateSelects(selectedDate);
		}
	).bind(
		'dpClosed',
		function(e, selected)
		{
			updateSelects(selected[0]);
		}
	);
	
var updateSelects = function (selectedDate)
{
	var selectedDate = new Date(selectedDate);
	$('#d option[value=' + selectedDate.getDate() + ']').attr('selected', 'selected');
	$('#m option[value=' + (selectedDate.getMonth()+1) + ']').attr('selected', 'selected');
	$('#y option[value=' + (selectedDate.getFullYear()) + ']').attr('selected', 'selected');
}
// listen for when the selects are changed and update the picker
$('#d, #m, #y')
	.bind(
		'change',
		function()
		{
			var d = new Date(
						$('#y').val(),
						$('#m').val()-1,
						$('#d').val()
					);
			$('#date-pick').dpSetSelected(d.asString());
		}
	);

// default the position of the selects to today
var today = new Date();
updateSelects(today.getTime());

// and update the datePicker to reflect it...
$('#d').trigger('change');
});
</script>

<!-- MUST BE THE LAST SCRIPT IN <HEAD></HEAD></HEAD> png fix -->
<script src="../js/jquery/jquery.pngFix.pack.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document).pngFix( );
});
</script>
</head>
<body>
	<div id="wrapper-head">
	<div id="head">
    	<div class="logo">
          <a href="<../../front-end/order/index.html">
                      <img src="../../images/logo-curryshop.png" alt="curryshop" width="276" height="35" />
                </a>
		</div>
        <!--  start top-search -->
        <div id="top-search">
            <table border="0" cellpadding="0" cellspacing="0">
            <tr>
            <td>
            <input type="text" value="Search" onblur="if (this.value=='') { this.value='Search'; }" onfocus="if (this.value=='Search') { this.value=''; }" class="top-search-inp" />
            </td>
            <td>
             
            <select  class="styledselect">
                <option value="">ทั้งหมด</option>
                <option value="">ผลิต</option>
                <option value="">จัดซื้อ</option>
                <option value="">จัดการรายการอาหารเหลือ</option>
                <option value="">รายงาน</option>
            </select> 
             
            </td>
            <td>
            <input type="image" src="../../images/shared/top_search_btn.gif"  />
            </td>
            </tr>
            </table>
        </div>
        <!--  end top-search -->
        <div class="clear"></div>
    </div>
    </div>
    <div class="clear"></div>
    <div id="nav_menu">
        <div class="nav">
         <ul class="current">
                <li>
                	<a href="#nogo" ><b>ผลิต</b></a>
               </li>
             </ul>
             <div class="nav-divider">&nbsp;</div>
             <ul class="select">   
                <li><a href="#"><b>จัดซื้อ</b></a></li>
                </ul>
                 
                <div class="nav-divider">&nbsp;</div>
                <ul class="select"> 
                <li><a href="#"><b>จัดการอาหารเหลือ</b></a></li>
                </ul>
                <div class="nav-divider">&nbsp;</div>
                 <ul class="select"> 
                	<li><a href="#"><b>รายงาน</b></a></li>
            	</ul>
                <div class="nav-divider">&nbsp;</div>
        </div>
        <div id="nav-right">
		
			<div class="nav-divider">&nbsp;</div>
                <div class="showhide-account">
                    <img src="../../images/shared/nav/nav_myaccount.gif" width="93" height="14" alt="" />
                </div>
			<div class="nav-divider">&nbsp;</div>
                <a href="" id="logout">
                    <img src="../../images/shared/nav/nav_logout.gif" width="64" height="14" alt="" />
                </a>
			<div class="clear">&nbsp;</div>
        </div>    
    </div>
    <div class="clear"></div>
    <div id="content-outer">
        <div id="content">
        		<div id="page-heading"><h1>เพิ่มรายการอาหาร</h1></div>
                    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
                    <tr>
                        <th rowspan="3" class="sized"><img src="../../images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
                        <th class="topleft"></th>
                        <td id="tbl-border-top">&nbsp;</td>
                        <th class="topright"></th>
                        <th rowspan="3" class="sized">
                        <img src="../../images/shared/side_shadowright.jpg" width="20" height="300" alt="" />
                        </th>
                    </tr>
                    <tr>
                        <td id="tbl-border-left"></td>
                        <td>
                        <!--  start content-table-inner -->
                        <div id="content-table-inner">
                        
                        <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr valign="top">
                        <td>
                        
                        
                            <!--  start step-holder -->
                            <div id="step-holder">
                                <div class="step-no">1</div>
                                <div class="step-dark-left">
                                        <a href="">รายละเอียดของอาหาร</a>
                                </div>
                                <div class="step-dark-right">&nbsp;</div>
                                <div class="step-no-off">2</div>
                                <div class="step-light-left">สูตรการผลิต</div>
                                <div class="step-light-right">&nbsp;</div>
                                         <div class="step-no-off">3</div>
                                        <div class="step-light-left">
                                                <a href="step2.html">
                                                	ราคาขายสินค้า
                                                </a>
                                      </div>
                                        <div class="step-light-right">&nbsp;</div>
                                <div class="step-no-off">4</div>
                                <div class="step-light-left">ตรวจสอบและยืนยัน</div>
                                <div class="step-light-round">&nbsp;</div>
                                <div class="clear"></div>
                            </div>
                            <!--  end step-holder -->
                        
                            <!-- start id-form -->
                            <form name="bom" action="step2.html" method="post">
                            <table width="972" height="16">
                            	<tr>
                                	<td width="144">ชื่ออาหาร<span class="red">&nbsp;*</span>
                                    </td>
                                    <td width="4">:</td>
                                    <td width="292"><input type="text" class="inp-form-error" /></td>
                                    <td width="512">
                                    	 
                                    </td>
                                </tr>
                            	<tr>
                            	  <td valign="top">&nbsp;</td>
                            	  <td valign="top">&nbsp;</td>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                          	  </tr>
                            	<tr>
                            	  <td valign="top">รายละเอียดอาหาร</td>
                                  <td valign="top">:</td>
                            	  <td><textarea name="textarea" id="textarea" cols="30" rows="4"></textarea></td>
                            	  <td>&nbsp;</td>
                          	  </tr>
                            	<tr>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                          	  </tr>
                            	<tr>
                            	  <td>ชื่อประเภทอาหาร<span class="red">&nbsp;*</span></td>
                                  <td>:</td>
                            	  <td><select name="foodTypeId" class="styledselect_form_1">
                                    <% 
                                        List<FoodType> foodTypes = (List<FoodType>)request.getAttribute("foodTypes");
                                        for(FoodType foodType: foodTypes) {
                                    %>      <option value="<%=foodType.getIdFoodType()%>"><%=foodType.getFoodTypeName()%></option>   <%
                                        }
                                    %>
                                    </select></td>
                            	  <td>
                                  	
                                  </td>
                          	  </tr>
                            
                              <tr>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                              </tr>
                              <tr>
                            	  <td>ภาชนะที่ใช้ตัก<span class="red">&nbsp;*</span></td>
                                  <td>:</td>
                            	  <td>
                                    <select name="kitchenWareId" class="styledselect_form_1">
                                    <% 
                                        List<KitchenWare> pickingWares = (List<KitchenWare>)request.getAttribute("pickingWares");
                                        for(KitchenWare pickingWare: pickingWares) {
                                    %>      <option value="<%=pickingWare.getIdKitchenWare()%>"><%=pickingWare.getKitchenWareName()%></option>   <%
                                        }
                                    %>
                                    </select>
                                  </td>
                            	  <td>
                                  <a href="#">
                                  		<img src="../../images/forms/icon_plus.gif" />
                                        	&nbsp;เพิ่มภาชนะที่ใช้ตัก
                                        </a>
                                   </td>
                          	  </tr>
                              <tr>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                          	  </tr>
                              <tr>
                            	  <td valign="top">ฤดูกาลของอาหาร<span class="red">&nbsp;*</span></td>
                                  <td valign="top">:</td>
                                  <td><select name="seasonId" class="styledselect_form_1">
                                    <% 
                                        List<FoodSeason> foodSeasons = (List<FoodSeason>)request.getAttribute("foodSeasons");
                                        for(FoodSeason foodSeason: foodSeasons) {
                                    %>      <option value="<%=foodSeason.getIdFoodSeason()%>"><%=foodSeason.getFoodSeasonName()%></option>   <%
                                        }
                                    %>
                                    </select>
                                  <br />
                                  </td>
                            	  <td>&nbsp;</td>
                          	</tr>
                            <tr>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                          	  </tr>
                              <tr>
                            	  <td valign="top">หน่วยวัดปริมาณอาหาร<span class="red">&nbsp;*</span></td>
                                  <td valign="top">:</td>
                                  <td><select name="unitTypeId" class="styledselect_form_1">
                                    <% 
                                        List<UnitType> unitTypes = (List<UnitType>)request.getAttribute("unitTypes");
                                        for(UnitType unitType: unitTypes) {
                                    %>      <option value="<%=unitType.getIdUnitType()%>"><%=unitType.getUnitTypeName()%></option>   <%
                                        }
                                    %>
                                    </select>
                                  <br />
                                  </td>
                            	  <td>&nbsp;</td>
                          	</tr>
                            	<tr>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                          	  </tr>
                            	<tr>
                            	  <td>รูปภาพอาหาร<span class="red">&nbsp;*</span></td>
                                  <td>:</td>
                            	  <td><input type="file" class="inp-form"/></td>
                            	  <td>
                                  		 <div class="bubble-left"></div>
                                        <div class="bubble-inner">JPEG, GIF 5MB max per image</div>
                                        <div class="bubble-right"></div>
                                  </td>
                          	  </tr>
                            	<tr>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                            	  <td>&nbsp;</td>
                          	  </tr>
                            	<tr>
                            	  <td>&nbsp;</td>
                            	  <td>
                                  		
                                  </td>
                            	  <td><input type="reset" value="reset" class="form-reset"  /> <input type="submit" value="Next" class="form-submit" /></td>
                          	  </tr>
                            </table>
                            
                        </form>
                        <!-- end id-form  -->
                    
                        </td>
                        <td>
                    
                        <!--  start related-activities --><!-- end related-activities -->
                    
                    </td>
                    </tr>
                    <tr>
                    <td><img src="../../images/shared/blank.gif" width="695" height="1" alt="blank" /></td>
                    <td></td>
                    </tr>
                    </table>
                     
                    <div class="clear"></div>
                     
                    
                    </div>
                    <!--  end content-table-inner  -->
                    </td>
                    <td id="tbl-border-right"></td>
                    </tr>
                    <tr>
                        <th class="sized bottomleft"></th>
                        <td id="tbl-border-bottom">&nbsp;</td>
                        <th class="sized bottomright"></th>
                    </tr>
                    </table>
        </div>
    </div>
    <div class="clear"></div>
    <div id="footer">
    	<div id="footer-left">
			Admin Skin &copy; Copyright Fastfood BSD 5EX. 
    	</div>
		<div class="clear">&nbsp;</div>
    </div> 
    
</body>
</html>